/////////////////////////////////////////////////////////////////////////////
// Name:        ax_log.h
// Purpose:     Speech-enabled log target and dialog
// Author:      Vadim Zeitlin, Julian Smart
// Modified by:
// Created:     2009-04-16
// RCS-ID:
// Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>,
//              (c) 2009 Julian Smart
// Licence:     New BSD License
/////////////////////////////////////////////////////////////////////////////

#ifndef   _AX_LOG_H_
#define   _WX_LOG_H_

#include "wx/log.h"

/**
  @class AxLogGui

  A GUI log target that shows an accessible log window. Use this in your
  application initialisation code:

  @code
  delete wxLog::SetActiveTarget(new AxLogGui);
  @endcode

  */

class AxLogGui: public wxLog
{
public:
    // ctor
    AxLogGui();

    // show all messages that were logged since the last Flush()
    virtual void Flush();

protected:
    virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t);

    // empty everything
    void Clear();

    wxArrayString m_aMessages;      // the log message texts
    wxArrayInt    m_aSeverity;      // one of wxLOG_XXX values
    wxArrayLong   m_aTimes;         // the time of each message
    bool          m_bErrors,        // do we have any errors?
                  m_bWarnings,      // any warnings?
                  m_bHasMessages;   // any messages at all?

};


#endif
    // _AX_LOG_H_

